#pragma once

#define M_PI	3.14159265358979323846

namespace OpenGLWrapper
{
	class Vector3D
	{
	public:
		double x, y, z;
	public:
		Vector3D() {x = y = z = 0;}
		Vector3D(double _x, double _y, double _z) : x(_x), y(_y), z(_z) {}
		Vector3D(const Vector3D& src) : x(src.x), y(src.y), z(src.z) {}
		~Vector3D() {}
	public:
		Vector3D operator+(const Vector3D& rhs) { return Vector3D(x + rhs.x, y + rhs.y, z + rhs.z); }
		Vector3D operator-(const Vector3D& rhs) { return Vector3D(x - rhs.x, y - rhs.y, z - rhs.z); }
		Vector3D operator*(double c) { return Vector3D(x * c, y * c, z * c); }
	public:
		double Dot(Vector3D rhs) { return x*rhs.x + y*rhs.y + z*rhs.z; }
		double Length() { return sqrt(x*x + y*y + z*z); }
		double Angle(Vector3D rhs)  { return (acos(Dot(rhs) / (Length() * rhs.Length()))) * 180.0 / M_PI; }
	};
	static Vector3D operator*(double c, Vector3D& rhs) {return rhs * c;}
}